package com.litong.rms.service.impl;

import java.util.List;
import com.litong.rms.bean.Role;
import com.litong.rms.dao.RoleDao;
import com.litong.rms.service.RoleService;

public class RoleServiceImpl implements RoleService {
	private RoleDao roleDao;
	
	public void addRole(Role role) {
		System.out.println("Role has been saved!");
		roleDao.addRole(role);
		
	}
	
	public Role findRole(Role role) {
		return roleDao.findRole(role);
	}
	public void updateRole(Role role){
		roleDao.updateRole(role);
	}
	
	public void deleteRole(Role role) {
		roleDao.deleteRole(role);
		
	}

	@SuppressWarnings("unchecked")
	public List<Role> getRoleList() {
		return roleDao.getRoleList();
	}
	
	
	public void setRoleDao(RoleDao RoleDao) {
		this.roleDao = RoleDao;
	}
	public RoleDao getRoleDao() {
		return roleDao;
	}

	public Role findById(int id) {
		
		return roleDao.findById(id);
	}
	

}
